﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ShippingExpenses.aspx.cs" Inherits="ShippingExpenses" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>标准费用导入</title>
    <script src="../js/extTools.js" type="text/javascript"></script>
    <style>
        .x-grid-row-over .x-grid-cell-inner
        {
            font-weight: bold;
        }
        .x-column-header-inner
        {
            height: 28px;
            background: #E7EBEF url(./images/header.png) repeat-x 0 0;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <ext:ResourceManager ID="ResourceManager1" runat="server" Theme="Crisp" />
        <ext:Viewport ID="Viewport1" runat="server" Layout="FitLayout">
            <Items>
                <ext:Hidden ID="FormatType" runat="server" />
                <ext:Hidden ID="Hidden1" runat="server" />
                <ext:GridPanel ID="GridPanel1" runat="server" TitleAlign="Center">
                    <TopBar>
                        <ext:Toolbar ID="Toolbar1" runat="server" Layout="ColumnLayout">
                            <Items>
                                <ext:DateField runat="server" ID="txtmonth" FieldLabel="所属月份" EmptyText="所属月份" Type="Month"
                                    Format="yyyy-MM" />
                                <ext:TextField runat="server" ID="txtshop" EmptyText="输入店铺编号/名称" />
                                <ext:Button ID="Button1" runat="server" Text="查询" OnDirectClick="BtnQureyUser" UI="Info"
                                    Icon="Find">
                                    <DirectEvents>
                                        <Click>
                                            <EventMask ShowMask="true" Msg="加载中...">
                                            </EventMask>
                                        </Click>
                                    </DirectEvents>
                                </ext:Button>
                                <ext:Component runat="server" Width="1500" Margin="3" />
                                <ext:MultiUpload ID="MultiUpload1" runat="server" OnFileUpload="MultiUpload1_FileUpload"
                                    AutoStartUpload="true" FileDropAnywhere="true" FileSizeLimit="15 MB" FileTypes="*.*"
                                    FileTypesDescription="All Files" FileUploadLimit="100" FileQueueLimit="0">
                                    <Button>
                                        <ext:Button ID="Button3" runat="server" Text="打开本地文件..." Icon="FolderGo">
                                        </ext:Button>
                                    </Button>
                                    <Listeners>
                                        <UploadStart Handler="Ext.Msg.wait('导入中，请稍等...');" />
                                        <UploadError Fn="uploadError" />
                                        <FileSelectionError Fn="fileSelectionError" />
                                        <UploadComplete Handler="Ext.Msg.hide();" />
                                    </Listeners>
                                </ext:MultiUpload>
                                <ext:Button ID="Button4" runat="server" Text="删除" OnDirectClick="BtnDeletData" UI="Danger"
                                    Icon="Delete" />
                            </Items>
                        </ext:Toolbar>
                    </TopBar>
                    <Store>
                        <ext:Store ID="Store1" runat="server" PageSize="100" OnReadData="RefreshDataSet"
                            OnSubmitData="Store1_Submit">
                            <Model>
                                <ext:Model ID="Model1" runat="server">
                                    <Fields>
                                        <ext:ModelField ServerMapping="DeptName" Name="报销部门" />
                                        <ext:ModelField ServerMapping="PayDate" Name="支付日期" />
                                        <ext:ModelField ServerMapping="PayMonth" Name="所属月份" />
                                        <ext:ModelField ServerMapping="ShopCode" Name="店铺代码" />
                                        <ext:ModelField ServerMapping="ShopName" Name="店铺简称" />
                                        <ext:ModelField ServerMapping="ExpenseName" Name="费用项目" />
                                        <ext:ModelField ServerMapping="Property" Name="运输性质" />
                                        <ext:ModelField ServerMapping="StockName" Name="发出仓库" />
                                        <ext:ModelField ServerMapping="VendorName" Name="物流供应商" />
                                        <ext:ModelField ServerMapping="TrackCode" Name="运货单号" />
                                        <ext:ModelField ServerMapping="Consignee" Name="收货人" />
                                        <ext:ModelField ServerMapping="CityName" Name="到达市" />
                                        <ext:ModelField ServerMapping="DboxNum" Name="大箱数" />
                                        <ext:ModelField ServerMapping="XboxNum" Name="小箱数" />
                                        <ext:ModelField ServerMapping="Product" Name="品名" />
                                        <ext:ModelField ServerMapping="DPrice" Name="标准小箱运价" />
                                        <ext:ModelField ServerMapping="XPrice" Name="标准大箱运价" />
                                        <ext:ModelField ServerMapping="Dfreight" Name="大箱运费" />
                                        <ext:ModelField ServerMapping="Xfreight" Name="小箱运费" />
                                        <ext:ModelField ServerMapping="OverFee" Name="附加运费" />
                                        <ext:ModelField ServerMapping="Total" Name="总额" />
                                        <ext:ModelField ServerMapping="Remark" Name="备注" />
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:Store>
                    </Store>
                    <ColumnModel>
                    <Columns>
                        <ext:Column ID="Column1" runat="server" Text="报销部门" DataIndex="报销部门" Width="100" />
                        <ext:Column ID="Column20" runat="server" Text="支付日期" DataIndex="支付日期" Width="100" />
                        <ext:Column ID="Column2" runat="server" Text="所属月份" DataIndex="所属月份" Width="80" />
                        <ext:Column ID="Column10" runat="server" Text="店铺代码" DataIndex="店铺代码" Width="80" />
                        <ext:Column ID="Column11" runat="server" Text="店铺简称" DataIndex="店铺简称" Width="80" />
                        <ext:Column ID="Column21" runat="server" Text="费用项目" DataIndex="费用项目" Width="80" />
                        <ext:Column ID="Column22" runat="server" Text="运输性质" DataIndex="运输性质" Width="80" />
                        <ext:Column ID="Column4" runat="server" Text="发出仓库" DataIndex="发出仓库" Width="80" />
                        <ext:Column ID="Column5" runat="server" Text="物流供应商" DataIndex="物流供应商" Width="80" />
                        <ext:Column ID="Column6" runat="server" Text="运货单号" DataIndex="运货单号" Width="80" />
                        <ext:Column ID="Column7" runat="server" Text="收货人" DataIndex="收货人" Width="80" />
                        <ext:Column ID="Column8" runat="server" Text="到达市" DataIndex="到达市" Width="80" />
                        <ext:Column ID="Column12" runat="server" Text="大箱数" DataIndex="大箱数" Width="80" />
                        <ext:Column ID="Column13" runat="server" Text="小箱数" DataIndex="小箱数" Width="80" />
                        <ext:Column ID="Column14" runat="server" Text="品名" DataIndex="品名" Width="80" />
                        <ext:Column ID="Column15" runat="server" Text="标准小箱运价" DataIndex="标准小箱运价" Width="80" />
                        <ext:Column ID="Column16" runat="server" Text="标准大箱运价" DataIndex="标准大箱运价" Width="80" />
                        <ext:Column ID="Column9" runat="server" Text="大箱运费" DataIndex="大箱运费" Width="80" />
                        <ext:Column ID="Column17" runat="server" Text="小箱运费" DataIndex="小箱运费" Width="80" />
                        <ext:Column ID="Column23" runat="server" Text="附加运费" DataIndex="附加运费" Width="80" />
                        <ext:Column ID="Column18" runat="server" Text="总额" DataIndex="总额" Width="80" />
                        <ext:Column ID="Column19" runat="server" Text="备注" DataIndex="备注" Width="80" />
                    </Columns>
                    </ColumnModel>
                    <SelectionModel>
                        <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
                    </SelectionModel>
                    <BottomBar>
                        <ext:PagingToolbar ID="PagingToolbar1" runat="server">
                            <Items>
                                <ext:Label ID="Label1" runat="server" Text="每页显示:" />
                                <ext:ToolbarSpacer ID="ToolbarSpacer1" runat="server" Width="10" />
                                <ext:ComboBox ID="ComboBox1" runat="server" Width="80">
                                    <Items>
                                        <ext:ListItem Text="10" />
                                        <ext:ListItem Text="20" />
                                        <ext:ListItem Text="50" />
                                        <ext:ListItem Text="100" />
                                    </Items>
                                    <SelectedItems>
                                        <ext:ListItem Value="50" />
                                    </SelectedItems>
                                    <Listeners>
                                        <Select Handler="#{GridPanel1}.store.pageSize = parseInt(this.getValue(), 10); #{GridPanel1}.store.reload();" />
                                    </Listeners>
                                </ext:ComboBox>
                                <ext:Button ID="Button2" runat="server" Text="导出Excel" Icon="PageExcel">
                                    <Listeners>
                                        <Click Handler="exportData('xls');" />
                                    </Listeners>
                                </ext:Button>
                            </Items>
                            <Plugins>
                                <ext:ProgressBarPager ID="ProgressBarPager1" runat="server" />
                            </Plugins>
                        </ext:PagingToolbar>
                    </BottomBar>
                </ext:GridPanel>
                <ext:Window ID="Window1" runat="server" Title="EXCEL名称列表" Icon="Accept" Height="400"
                    Width="800" Hidden="true" Layout="FitLayout">
                    <Items>
                        <ext:GridPanel ID="GridPanel2" runat="server">
                            <Store>
                                <ext:Store ID="Store4" runat="server" PageSize="100">
                                    <Model>
                                        <ext:Model ID="Model4" runat="server">
                                            <Fields>
                                                <ext:ModelField Name="sheetname" />
                                            </Fields>
                                        </ext:Model>
                                    </Model>
                                </ext:Store>
                            </Store>
                            <ColumnModel>
                                <Columns>
                                    <ext:CommandColumn ID="CommandColumn1" runat="server" Header="操作">
                                        <Commands>
                                            <ext:GridCommand Icon="Accept" Text="选择" CommandName="Shopselect" />
                                        </Commands>
                                        <DirectEvents>
                                            <Command OnEvent="sheetnameselect">
                                                <ExtraParams>
                                                    <ext:Parameter Name="sheetname" Value="record.data.sheetname" Mode="Raw" />
                                                </ExtraParams>
                                            </Command>
                                        </DirectEvents>
                                    </ext:CommandColumn>
                                    <ext:Column ID="Column3" runat="server" Text="名称" DataIndex="sheetname" Width="250" />
                                </Columns>
                            </ColumnModel>
                        </ext:GridPanel>
                    </Items>
                </ext:Window>
            </Items>
        </ext:Viewport>
    </div>
    </form>
</body>
</html>
